package com.ikas.ai.server.module.morningpaper.model.elements.wholeyear;

import com.ikas.ai.server.module.morningpaper.consts.MorningPaperConditionWholeYearVariableNames;
import com.ikas.ai.server.module.morningpaper.consts.MorningPaperElementPriorities;
import com.ikas.ai.server.module.morningpaper.model.dto.MorningPaperVariablesDto;
import com.ikas.ai.server.module.morningpaper.model.po.MorningPaperVariablesPo;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Component;

import java.util.Map;

//@Component
//@Lazy
public class ElementConditionGWholeYearSuccessPercent extends AbstractElementMachineConditionWholeYearSuccessPercent {
    protected String MORNING_PAPER_VARIABLE_NAME = MorningPaperConditionWholeYearVariableNames.conditionGInWholeYearSuccessPercent.name();
    @Override
    public String getMorningPaperVariableName() {
        return MORNING_PAPER_VARIABLE_NAME;
    }
    protected MorningPaperElementPriorities PRIORITY = MorningPaperElementPriorities.THIRD_PRIORITY;
    @Override
    public MorningPaperElementPriorities getPriority(){
        return this.PRIORITY;
    }

    @Override
    public MorningPaperVariablesDto render(MorningPaperVariablesDto mv, Map<String, MorningPaperVariablesPo> variablesPoMap, Map<String, Object> transmitMap) {
        super.render(mv, variablesPoMap, transmitMap);
        mv.setConditionGInWholeYearSuccessPercent(
                fillWholeYearSuccessPercent(this,mv)
        );
        return mv;
    }
}
